package com.example.answer_staff;
import android.content.Intent;
import android.net.Uri;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.ImageView;

public class SettingActivity  extends  BaseActivity{

	private ImageView change_password;
	private ImageView about_app;
	private ImageView terms_service;
	private ImageView private_policy;
	private ImageView report_problem;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		super.setContentViewItem(R.layout.settings);
		setupView();
		setListeneers();

	}

	private void setListeneers() {
		change_password.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(SettingActivity.this,ChangePasswordActivity.class));
			}
		});

		terms_service.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(SettingActivity.this,TermServiceActivity.class));

			}
		});		

		private_policy.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {

				startActivity(new Intent(SettingActivity.this,PrivatePolicyActivity.class));
			}
		});
		report_problem.setOnClickListener(new OnClickListener() {
			@Override
			public void onClick(View arg0) {
				Intent intent=new Intent();
				intent.setAction(Intent.ACTION_VIEW);
				intent.addCategory(Intent.CATEGORY_BROWSABLE);
				intent.setData(Uri.parse("mailto:red.support.NICKNAME@NICKNAME.com.cn"));
				startActivity(intent);
			}
		});

		about_app.setOnClickListener(new OnClickListener() {

			@Override
			public void onClick(View arg0) {
				startActivity(new Intent(SettingActivity.this,InfoActivity.class));

			}
		});


		showtitleBtnLeftWidthImgDefaule(R.drawable.menu) ;
		hideTitlebtnRight() ;
		hideTitlebtnAlignRight() ;

	}

	private void setupView() {
		setTitleName("Setting") ;
		change_password=(ImageView)findViewById(R.id.change_password);
		about_app=(ImageView)findViewById(R.id.about_appim);
		terms_service=(ImageView)findViewById(R.id.terms_serviceim);
		private_policy=(ImageView)findViewById(R.id.private_policyim);
		report_problem=(ImageView)findViewById(R.id.report_problemim);

	}



}
